<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>func</title>
</head>
<body>


    <div id="app">
        <button v-on:click="haha">我是一个按钮</button>
        <h3>当前的年龄为:{{age}}</h3>
    </div>


    <script src="../node_modules/vue/dist/vue.js"></script>
    <script>
        let app = new Vue({
            el:"#app",
            data:{
                age:50
            },
            methods:{//方法的定义一定和属性定义不能重名
                haha(){
                   this.age++
                }
            }

        });
    </script>
</body>
</html>